package com.pfs.internal.timestamp.entities;

import java.util.Date;

import org.apache.commons.lang3.StringUtils;

import com.pfs.internal.timestamp.utils.FoulLevel;

public class TrackDay {
	private Integer id;
	private String username;
	private Date date;
	private Date checkIn;
	private Date checkOut;
	private boolean fail;
	private FoulLevel level;
	private String note;
	private Integer officeTime;
	private String officeTimeStr;

	private String compoundKey;
	public final static String NOTE_FULLDAY = "Nghỉ không phép";
	public final static String NOTE_CHECK_DOUBLE = "Check in muộn, check out sớm";
	public final static String NOTE_CHECKIN_LATE = "Check in muộn";
	public final static String NOTE_CHECKOUT_SOON = "Check out sớm";
	public final static String NOTE_NO_CHECKOUT = "Không check out";// check in dung gio, khong check out
	public final static String NOTE_LATE_NO_OUT = "Check in muộn, không check out";// check in dung gio, khong check out
	public final static String NOTE_FULLDAY_LEAVE = "Đã xin nghỉ cả ngày";
	public final static String NOTE_HALFDAY_LEAVE = "Đã xin nghỉ nửa ngày";

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public Date getCheckIn() {
		return checkIn;
	}

	public void setCheckIn(Date checkIn) {
		this.checkIn = checkIn;
	}

	public Date getCheckOut() {
		return checkOut;
	}

	public void setCheckOut(Date checkOut) {
		this.checkOut = checkOut;
	}

	public boolean isFail() {
		return fail;
	}

	public void setFail(boolean fail) {
		this.fail = fail;
	}

	public FoulLevel getLevel() {
		return level;
	}

	public void setLevel(FoulLevel level) {
		this.level = level;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public String getCompoundKey() {
		if (StringUtils.isNotBlank(this.username) && this.date != null) {
			compoundKey = this.username + date.toString();
		}
		return compoundKey;
	}

	public void setCompoundKey(String compoundKey) {
		this.compoundKey = compoundKey;
	}

	public Integer getOfficeTime() {
		return officeTime;
	}

	public void setOfficeTime(Integer officeTime) {
		this.officeTime = officeTime;
	}

	public String getOfficeTimeStr() {
		return officeTimeStr;
	}

	public void setOfficeTimeStr(String officeTimeStr) {
		this.officeTimeStr = officeTimeStr;
	}
public static void main(String[] args) {
	int a = 490;
	System.out.println(490/60);
	System.out.println(490%60);
}
}
